#include "networkmanager.h"

NetworkManager::NetworkManager(QObject*parent):QObject (parent)
{
    socket = new QTcpSocket(this);
}

bool NetworkManager::connectToServer(const QString &host, quint16 port)
{
    socket->connectToHost(host,port);
    return socket->waitForConnected();
}

QTcpSocket* NetworkManager::getSocket()
{
    return socket;
}
